1.action的名称是大写的
action分两种，一种是在controller中的，一种是单独的类，执行运行run方法

2.创建一个单独的action是
D:\code\php_laravel\demo2\components\GreetingAction.php
要创建目录components
并且在controller要配置
    public function actions(){
        return [
            'greeting'=>'app\components\GreetingAction',
        ];
    }

3.重定向
使用redirect($url);

4.action参数，从$_GET获取
action定义：actionTestParams($first,$second)
请求的url地址：http://localhost:8888/index.php?r=example/test-params&first=111&second=2

5.默认action设置，设置属性
public $defaultAction='hello-world';
访问url：http://localhost:8888/index.php?r=example/
相当于 http://localhost:8888/index.php?r=example/hello-world

7.请求周期
运行yii\base\Controller:init()
生产action实例
调用beforeAction方法
运行action
调用afterAction方法
返回响应

The yii\base\Controller:init() method is called.
The controller creates an action based on the action ID.
The controller sequentially calls the beforeAction() method of the web application, module, and the controller.
The controller runs the action.
The controller sequentially calls the afterAction() method of the web application, module, and the controller.
The application assigns action result to the response.